<?php

namespace MLM\Model;

use MLM\Model\Generic\Object\Map;
use MLM\Model\Generic\Object\Mapper;

class Product extends Mapper {
    
    protected $_storage;
    
    public function __construct(\MLM\Model\Product\Storage $storage) {
   
        $this->_storage = $storage;

        parent::__construct(
                array(
                ),
                array(
                    'product_id'         => 'id',
                    'product_code'       => 'productCode',
                    'product_name'       => 'productName',
                    'suplier_id'         => 'suplierId',
                    'product_desc'       => 'productDesc',
                    'parent_product_id'  => 'parentProductId',
                    'product_owner_id'   => 'productOwnerId'                    
                )
         );
    }
    
    
    public function save(){
        
        return $this->_storage->save($this);
    }


    public function edit($where){

        return $this->_storage->edit($this, $where);
    }
    
    
       
}
